﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace TPCN.DAL
{
   public class DiachiObj
    {
        private string _DiachiID;

        public string DiachiID
        {
            get { return _DiachiID; }
            set { _DiachiID = value; }
        }
        private string _KhachID;

        public string KhachID
        {
            get { return _KhachID; }
            set { _KhachID = value; }
        }
        private string _TinhThanhPhoID;

        public string TinhThanhPhoID
        {
            get { return _TinhThanhPhoID; }
            set { _TinhThanhPhoID = value; }
        }
        private string _Diachicuthe;

        public string Diachicuthe
        {
            get { return _Diachicuthe; }
            set { _Diachicuthe = value; }
        }
        private string _Ghichu;

        public string Ghichu
        {
            get { return _Ghichu; }
            set { _Ghichu = value; }
        }
        public DiachiObj SetValuesFromDataReader(IDataReader reader)
        {
            DiachiObj obj = new DiachiObj();
            obj.DiachiID = (reader["DiachiID"] is DBNull) ? String.Empty : reader["DiachiID"].ToString();
            obj.KhachID = (reader["KhachID"] is DBNull) ? String.Empty : reader["KhachID"].ToString();
            obj.TinhThanhPhoID = (reader["TinhThanhPhoID"] is DBNull) ? String.Empty : reader["TinhThanhPhoID"].ToString();
            obj.Diachicuthe = (reader["Diachicuthe"] is DBNull) ? String.Empty : reader["Diachicuthe"].ToString();
            obj.Ghichu = (reader["Ghichu"] is DBNull) ? String.Empty : reader["Ghichu"].ToString();
            return obj;
        }
    }
}
